package com.dzm.xgb.core.service;

import com.dzm.xgb.core.pojo.entity.UserAccount;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.Map;

/**
 * <p>
 * 用户账户 服务类
 * </p>
 *
 * @author Dzm
 * @since 2024-08-27
 */
public interface UserAccountService extends IService<UserAccount> {

    /**
     * 充值
     * @param chargeAmt
     * @param userId
     * @return
     */
    String commitCharge(BigDecimal chargeAmt, Long userId);

    String notifyUserAccount(Map<String, Object> map);

    BigDecimal getAccount(Long userId);

    void updateUserAccount(String bindCode, BigDecimal chargeAmt,  BigDecimal freezeAmt);

    /**
     * 资金体现
     * @param userId
     * @param fetchAmt
     * @return
     */
    String commitWithdraw(Long userId, BigDecimal fetchAmt);

    /**
     * 体现回调
     * @param map
     * @return
     */
    String notifyWithdraw(Map<String, Object> map);
}
